package com.yyzw.activiti.modeler.dao;

import com.yyzw.activiti.modeler.model.SysRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
@Repository
public interface RoleMapper extends Mapper<SysRole> {

    @Insert("insert into sys_role_menu(role_id,menu_id) values(#{roleId},#{menuId})")
    void insertMenuRole(@Param("roleId") int roleId, @Param("menuId")  int menuId);

    @Delete("delete from sys_role_menu where role_id=#{roleId}")
    void delMenuRole(@Param("roleId") int roleId);
}
